package com.doujiang.stat.controller;

import com.doujiang.stat.domain.BaseEntity;
import com.doujiang.stat.service.IStatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：豆浆
 * @name :StatController
 * @Date：2023/12/22 21:34
 */
@Controller
@RequestMapping("stat")
public class StatController {

    @Autowired
    private IStatService statService;
    /*
    * 跳转到客户地区统计图表
    * */
    @RequestMapping("toCustomerAreaStat")
    public String toCustomerAreaStat(){
        return "stat/customerAreaStat";
    }

    /*
    * 加载客户地区数据
    * */
    @RequestMapping("loadCustomerAreaStatJson")
    @ResponseBody
    public List<BaseEntity> loadCustomerAreaStatJson(){

        return statService.loadCustomerAreaStatJson();
    }


}
